<template>
  <el-container>
    <!-- <el-header> -->
    <gall-header></gall-header>
    <!-- </el-header> -->
    <el-main><router-view> </router-view></el-main>
    <el-footer>
      <gall-footer></gall-footer>
    </el-footer>
  </el-container>
</template>
<script setup>
import { GallHeader, GallFooter } from "@/layout";
import { provide, onMounted } from "vue";
import { useStore } from "vuex";
import { allfield } from "@/mixin/index.js";
const { fieldA, fieldB } = allfield();
const store = useStore();
onMounted(async () => {
  await store.dispatch("seo/seoAll");
  document.title = store.state.seo.seoData[fieldA.value];
  let descriptionMeta = document.querySelector('meta[name="description"]');
  descriptionMeta.setAttribute(
    "content",
    store.state.seo.seoData[store.state.language.fieldB]
  );
  let firstLinkElement = document.getElementsByTagName("link")[0];
  firstLinkElement.setAttribute("href", store.state.seo.seoData.article_cover);
});
provide("allfield", allfield);

</script>
<style scoped></style>
<style>
.el-header,
.el-main,
.el-footer {
  padding: 0 !important;
}

/* .el-aside {
  width: 208px !important;
} */
</style>
